<%@ page contentType="text/html;charset=utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
	<head>
		<title>单人退宿</title>
		<link rel="stylesheet"
			href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
		<script type='text/javascript'
			src='<%=request.getContextPath()%>/dwr/interface/studentLodgeMgrAction.js'></script>
		<script type='text/javascript'
			src='<%=request.getContextPath()%>/dwr/engine.js'></script>
		<script type='text/javascript'
			src='<%=request.getContextPath()%>/dwr/util.js'></script>
		<script type="text/javascript">

	function checkoutAstudent(){
	var studentidno = $("student_id").innerHTML;
	if(studentidno==""){
			alert("请选择学生");
			return;
		}else{
			var studid = studentidno;
			if($('stuDorm').innerHTML!=""){
			studentLodgeMgrAction.checkOutAsingleStudentByStudentID(studid,checkoutcb);
			}else{
				alert("该学生还没安排住宿，退什么呀，想测bug？");
				return ;
			}	
		}
	}
	var checkoutcb = function checkout_cb(status){
		alert(status);
		stu_BasicInfo();
		}
		
	//enter键按下提交搜索
 	function submit(eventTag){
	 	var event = eventTag||window.event;    
   		var currentKey = event.charCode||event.which;  
			if(currentKey==13){ 
				onSearchStudentSubmit();
			}
	} 
	document.onkeydown = submit;
		
</script>
	</head>
	<body>
		<div id="page_container">
			<%@include file="checkoutbanner.jsp"%>
			<h2>
				单人退宿
			</h2>
			<!-- 引入学生基本信息页面 -->
			<jsp:include page="/student/basicstudentinfo.jsp"></jsp:include>
			<div id="chkout_btn">
				<input class="common_button" type="submit" value="退宿"
					onclick="javascript:checkoutAstudent();">
			</div>
		</div>
		<script type="text/javascript">	
			window.onload = function(){
				var nav_a=$j('#page_nav a');
				var nav_span=$j("#page_nav a span");
				for(var u = 0 ;u<nav_a.length;u++){
						nav_a.get(u).style.backgroundPosition="left top";
						nav_span.get(u).style.backgroundPosition="right top";							
				}
				$j('#page_nav a').get(0).style.backgroundPosition="0% -42px";
				$j("#page_nav a span").get(0).style.backgroundPosition="100% -42px";
			}	
		</script>
	</body>
</html>
